package com.niuwa.p2p.session;

import java.util.HashMap;
import java.util.Map;



/**
 * @ClassName: NiuwaSession
 * @Description: session
 * @author: zhangbo
 * @param <T>
 * @param <T>
 * @date:2015年1月28日 下午1:25:31
 */
public class NiuwaSessionFactory {

	private static ThreadLocal<Object> sessionUser = null;

	public static Map<String,String> verifyCode = new HashMap<String, String>() ;
	
	public static synchronized ThreadLocal<Object> getNiuwaSession(){
		if(sessionUser == null) {
			return new ThreadLocal<Object>();
		}
		return  sessionUser;		
	}
	
	public Object getSessionUser() {
		return sessionUser.get();
	}

	public void setSessionUser(Object user) {
		sessionUser.set(user);
	}
	
	
	
	
}
